package com.yueya.basic.news.content.model;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;
import com.yueya.basic.news.content.service.ContentService;

@SuppressWarnings("serial")
public class Content extends Model<Content> {

	public static final Content dao = new Content();
	
	public static final ContentService service = new ContentService();
	
	public int  getMaxOrderNum(){
		String sql = "select max(order_num) num from t_content where is_top = 1 ";
		Record record = Db.findFirst(sql);
		if(null != record.getInt("num"))
			return record.getInt("num");
		else
			return 0; 
	}
	
	

}
